Import Transport Key Set

Command:

To import the transport keys generated by the KMC.

Notes:

Use of this command requires the optional ESP licence. Error code 67 will be returned if the command is not licensed.

The output from this function is a double length key used to encrypt keys sent from the Europay KMC (BKEM) and a double length key used to MAC keys sent from the Europay KMC (BKAM)

 

Field

Length & Type

Details

COMMAND MESSAGE

Message Header

m A

Will be returned to the Host unchanged

Command Code

2 A

Value “R8”

KMC Sequence Number

8 B

Sequence number generated by KMC

  

Europay Member ID

10 N

The ID of the member this key set is intended for

Transport Key Set ID

4 N

Identifier of the set BKEM, BKAM, as given by the KMC

MAC on Europay CA Public Key

4 B

MAC on the Europay Public key

  

Europay CA Public Key

n B

Public Key, DER encoded in ASN.1 format (sequence of modulus and exponent)

Delimiter

1 A

‘;’ semi colon character

Signature Length

4 N

Length of signature block (T). This is a two byte signed integer with Most Significant Byte first

Signature Block

T B

Signature generated using the Europay

Delimiter

1 A

‘;’ semi colon character

ESP Private Key Length

4 N

Length (in bytes) of the Private Key field

ESP Private Key

n B

Private Key, encrypted using LMK pair 34-35

Delimiter

1 A

‘;’ semi colon character

Encrypted Key Length

4 N

Length of encrypted key (S). This is a two byte signed integer with Most Significant Byte first

Encrypted BKEM

S B

BKEM encrypted with the ESP public key

Encrypted BKAM

S B

BKAM encrypted with the ESP public key

Delimiter

1 A

‘;’ semi colon character

End Message Delimiter

1 C

  

Optional. Must be present if a message trailer is present. Value X'19

Message Trailer

n A

Optional. Maximum length 32 characters

 


 

Field

Length & Type

Details

RESPONSE MESSAGE

Message Header

m A

Will be returned to the Host unchanged

Response Code

2 A

Value “R9”

Error Code

2 N

00 - No error

15 - Error in input data

51 – Invalid KMC Sequence number

52 – Invalid MAC algorithm number

53 – Invalid Signature

54 – Invalid BKAM data format

55 – Invalid BKEM data format

56 – BKAM parity error

57 – BKEM parity error

58 – Invalid MAC on Public Key

80 - Data length error

BKAM

1 A + 32 H

BKAM encrypted under LMK pair 22-23 variant 6

BKEM

1 A + 32 H

BKEM encrypted under LMK pair 22-23 variant 5

End Message Delimiter

1 C

  

Will only be present if present in the command message. Value X'19

Message Trailer

n A

  

Will only be present if in the command message. Maximum length 32 characters